﻿using UnityEngine;
using System.Collections;

public class FollowPlayer:MonoBehaviour {

    public Vector3 offset;          // The offset at which the Health Bar follows the player.

    private Transform player;		// Reference to the player.

    private void Awake() {
        // Setting up the reference.
        player = GameObject.FindGameObjectWithTag("Player").transform;
        
    }

    // Update is called once per frame
    void Update() {
        // Set the position to the player's position with the offset.
        transform.position = player.position + offset;
    }
}
